#include"GameInstruction.h"
#include<QHBoxLayout>
GameInstruction::GameInstruction(QWidget* parent):QDialog(parent)
{
  instruction = new QTextEdit;
  instruction->setFixedSize(500,500);
  QString A(tr("1.游戏有三个不同难度等级，可在选项中选择."));
  QString B(tr("2.使用右键正确标记出所有地雷且点开其余格子方可获得胜利."));
  QString C(tr("3.在游戏创建后改变游戏难度，本局游戏难度不会改变."));
  QString D(tr("警告/反作弊：在游戏过程中更改难度，本局游戏不会获得胜利!"));
  instruction->append(A);
  instruction->append(B);
  instruction->append(C);
  instruction->append(D);
  instruction->setReadOnly(true);  //谢绝编辑 :)
  QHBoxLayout* main_layout = new QHBoxLayout;
  main_layout->addWidget(instruction);
  setLayout(main_layout);
  setFixedSize(500,500);
  setWindowTitle(tr("帮助"));
}
void GameInstruction::closeEvent(QCloseEvent*)
{
  hide();  //不关闭窗口，只是影藏
}
